import java.util.Scanner;

/**
 * @Author: YCKOKO
 * @Date: 2023-05-17
 * @Time:18:59
 * @Description:
 */
public class demo2 {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        String[] nums = s.split(" ");
        int n = Integer.parseInt(nums[0]);
        int m = Integer.parseInt(nums[1]);

        int[][] dp = new int[n+1][m+1];

        for(int i = 0; i < dp.length; i++){
            dp[i][0] = 1;
        }

        for(int i = 0; i < dp[0].length; i++){
            dp[0][i] = 1;
        }

        for(int i = 1; i < dp.length; i++){
            for(int j = 1; j < dp[0].length; j++){
                dp[i][j] = dp[i-1][j] + dp[i][j-1];
            }
        }

        System.out.println(dp[n][m]);
    }
}
